home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / EGAVGA.SWG / 0096_Change EGA-VGA Font Char.pas < prev    next >
Pascal/Delphi Source File  |  1994-02-03  |  2KB  |  59 lines

  1.  
  2. {OK...for awhile I've been saying I'm going to post my unit for changing
  3. characters...well today's the day.  This unit has one procedure called
  4. ProcessChar.  You pass ProcessChar the ordinal value of the character
  5. you wish to process (between 0 and 255), the data that holds your new
  6. character or where you want to load the existing character, and if you
  7. want to load it or save it.  There are also four constants that simulate
  8. a copyright symbol.  One is bigger than the other (that's the only
  9. difference).  You can replace characters with the copyright symbol so
  10. effectively you can have a legal C-in-a-circle in text mode!!  Although,
  11. I do not know if this is actually legal, so don't mark my words... }
  12.  
  13.  
  14. Unit ModChar;
  15.  
  16.       {                       Unit Name: ModChar                       }
  17.       {                      Author: Rob Perelman                      }
  18.  
  19. Interface
  20.  
  21. Const LoadChar=False;
  22.       SaveChar=True;
  23.  
  24. Type CharPic=Array[1..16] of Byte;
  25.  
  26. Const CRLeft: CharPic=(0,31,48,99,198,140,140,140,140,140,140,198,99,48,
  27.         31,0);
  28.       CRRight: CharPic=(0,248,12,198,99,1,1,1,1,1,33,99,198,12,248,0);
  29.       BigCRLeft: CharPic=(31,48,96,195,134,140,140,140,140,140,140,134,
  30.         195,96,48,31);
  31.       BigCRRight: CharPic=(248,12,6,195,97,1,1,1,1,1,33,97,195,6,12,
  32.         248);
  33.  
  34.   Procedure ProcessChar(CharNum: Byte; var Pic: CharPic; Which: Boolean);
  35.  
  36. Implementation
  37.  
  38. Uses Dos;
  39.  
  40. Procedure ProcessChar(CharNum: Byte; var Pic: CharPic; Which: Boolean);
  41. Begin
  42.   Inline($FA);
  43.   PortW[$3C4]:=$0402;
  44.   PortW[$3C4]:=$0704;
  45.   PortW[$3CE]:=$0204;
  46.   PortW[$3CE]:=$0005;
  47.   PortW[$3CE]:=$0006;
  48.   If Which then Move(Pic, Mem[$A000:CharNum*32], SizeOf(CharPic))
  49.            Else Move(Mem[$A000:CharNum*32], Pic, SizeOf(CharPic));
  50.   PortW[$3C4]:=$0302;
  51.   PortW[$3C4]:=$0304;
  52.   PortW[$3CE]:=$0004;
  53.   PortW[$3CE]:=$1005;
  54.   PortW[$3CE]:=$0E06;
  55.   Inline($FB);
  56. End;
  57.  
  58. End.
  59.